package ace.module.oauth2.server.core.impl.dao.repository;

import ace.cmp.spring.data.jdbc.querydsl.core.repository.QuerydslJdbcBaseRepository;
import ace.module.oauth2.server.core.impl.constant.Oauth2ServerCoreConstant;
import ace.module.oauth2.server.core.impl.dao.entity.Oauth2RegisteredClientAuthConfig;
import com.baomidou.dynamic.datasource.annotation.DS;
import java.util.List;
import org.springframework.stereotype.Repository;

/**
 * oauth2客户端支持的授权协议配置,支持本地bean与rest授权方式 repository.
 *
 * @author Caspar
 */
@DS(Oauth2ServerCoreConstant.DEFAULT_DATA_SOURCE_NAME)
@Repository
public interface Oauth2RegisteredClientAuthConfigRepository extends QuerydslJdbcBaseRepository<Oauth2RegisteredClientAuthConfig, Long> {

  List<Oauth2RegisteredClientAuthConfig> getByIdOfClientAndDeleteFlag(String idOfClient, Long deleteFlag);


  List<Oauth2RegisteredClientAuthConfig> getByIdOfClientAndDeleteFlagOrderByPriorityDesc(String idOfClient, Long deleteFlag);
}